package io.renren.utils.util.db.connection;

import javax.sql.DataSource;

/**
 * Factory to create or get data source object.
 * @author Clark Liu
 *
 */
public interface DataSourceFactory {
	static final String DEFAULT_DATABASE_NAME = "DefaultDS";
	static final String JDBC_CONFIG_FILE = "jdbc.properties";
	static final String CONFIGPREFIX = "jdbc.name.";
	static final String CONFIGDRIVERCLASSNAME = "jdbc.driverClassName";
	static final String CONFIGURL = "jdbc.url";
	static final String CONFIGUSERNAME = "jdbc.username";
	static final String CONFIGPASSWORD = "jdbc.password";
	static final String CONFIGMAXWAIT = "jdbc.maxWait";
	static final String CONFIGDBCPMAXIDLE = "jdbc.dbcp.maxIdle";
	static final String CONFIGDBCPMAXACTIVE = "jdbc.dbcp.maxActive";
	
	public DataSource getDataSource(String sourceName);
	
	public String getDefaultDS();
	
	public void setDefaultDS(String defaultDS);
	
}
